package com.half_q.equipment_management_halfq.dao;

import domain.Borrow;
import domain.BorrowApplication;
import domain.User;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanHandler;
import org.apache.commons.dbutils.handlers.BeanListHandler;
import org.apache.commons.dbutils.handlers.ScalarHandler;
import util.DruidUtil;

import java.sql.Date;
import java.sql.SQLException;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;

/**
 * 简介说明: 用户服务层接口
 *
 * @author: Half_Q_0115
 * @date: 2025/01/07 20:45:25
 * @version: 1.0
 */
public interface IUserDao {

    public int addUser(User user);
    public int deleteUserById(String id);
    public boolean checkUser(String username, String password);
    public int getIdentityById(String id) ;
    public String getNameById(String id);

    public boolean checkPhone(String phone_number);

    public String getIdByPhone(String phone_number);
    public int getIdentityByPhone(String phone_number);

    public String getNameByPhone(String phone_number);

    public int getCollegeIdById(String id) ;

    public int getCollegeIdByPhone(String phone_number);

    public List<User> findAllUser() ;
    public List<User> searchUsers(String id, String name, String gender, String college_id, String identity, String phone_number);

    public User findUserById(String id);

    public int modifyUser(User user) ;
}
